package zhengyanze.com.aipoemmax.guide.utils;

import android.app.Dialog;
import android.app.ProgressDialog;
import android.content.Context;

/**
 * 对话框管理
 * Created by MrZheng on 2017/7/23.
 */

public class DialogManager {
    static ProgressDialog dialog;

    public static void showDialog(Context context, String content) {
        if (dialog == null) {
            dialog = new ProgressDialog(context);
        }
        dialog.setMessage(content);
        dialog.show();
    }

    public static void dismissDialog() {
        if (dialog != null) {
            dialog.dismiss();
            dialog = null;
        }
    }
}
